package models

var WechatMenuType map[int]string

// 微信公众号菜单
type WechatMenu struct {
	Id       int64         `orm:"description(自增主键)"`
	Parent   *WechatMenu   `orm:"null;default(0);rel(fk);description(上级菜单Id)"`
	Type     int           `orm:"description(菜单类型 0无 1click 2view)"`
	TypeShow string        `orm:"-"`
	Name     string        `orm:"description(菜单名)"`
	Url      string        `orm:"description(点击菜单跳转链接)"`
	Key      string        `orm:"description(点击菜单推送的关键字)"`
	Sort     int           `orm:"description(排序，一级菜单从左到右由小到大，二级菜单由上到下由小到大)"`
	Children []*WechatMenu `orm:"-"`
}

func init() {
	WechatMenuType = map[int]string{
		0: "无",
		1: "关键字",
		2: "链接",
	}
}
